package com.xk._01基础篇._06二叉搜索树;

/**
 * @description:
 * @author: xu
 * @date: 2022/9/20 1:39
 */
public class Person implements Comparable<Person> {
    private int age;

    public Person(int age) {
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "age=" + age;
    }

    @Override
    public int compareTo(Person e) {
        return this.age - e.age;
    }
}
